<%
    Users user = Trader.getUser(request.getParameter("uid"));
	wstrader.task.trade.reports.NetDiffRisk task = user.trade.reports.net_diff_risk;

	task.getRequest().setRequest(request);
	task.getResponse().setResponse(response,out);
	
	if (!user.Authenticated()) {
		response.sendRedirect("logon.jsp");
		return;
	}
	((Tasks)task.getOwner()).clearFocus();
	task.setFocus(true);	
	
	Trader.window_width = "100%";	
	
	long focused_id = task.doTask();
	
	java.sql.Date MonthOne = Utils.strToDate("01-" + Utils.dateToStr(Utils.today()).substring(3));
	java.sql.Date MonthTwo = Utils.nextMonth(MonthOne);
	java.sql.Date MonthThree = Utils.nextMonth(MonthTwo);	
	java.sql.Date MonthFour = Utils.nextMonth(MonthThree);
	java.sql.Date MonthFive = Utils.nextMonth(MonthFour);
	java.sql.Date MonthSix = Utils.nextMonth(MonthFive);
	java.sql.Date MonthSeven = Utils.nextMonth(MonthSix);
	java.sql.Date MonthEight = Utils.nextMonth(MonthSeven);
	java.sql.Date MonthNine = Utils.nextMonth(MonthEight);
	java.sql.Date MonthTen = Utils.nextMonth(MonthNine);
	java.sql.Date MonthEleven = Utils.nextMonth(MonthTen);
	java.sql.Date MonthTwelve = Utils.nextMonth(MonthEleven);									
	java.sql.Date MonthThirteen = Utils.nextMonth(MonthTwelve);
	
	String M_One = Utils.dateToStr(MonthOne).substring(3);
	String M_Two = Utils.dateToStr(MonthTwo).substring(3);
	String M_Three = Utils.dateToStr(MonthThree).substring(3);
	String M_Four = Utils.dateToStr(MonthFour).substring(3);
	String M_Five = Utils.dateToStr(MonthFive).substring(3);
	String M_Six = Utils.dateToStr(MonthSix).substring(3);
	String M_Seven = Utils.dateToStr(MonthSeven).substring(3);
	String M_Eight = Utils.dateToStr(MonthEight).substring(3);
	String M_Nine = Utils.dateToStr(MonthNine).substring(3);
	String M_Ten = Utils.dateToStr(MonthTen).substring(3);
	String M_Eleven = Utils.dateToStr(MonthEleven).substring(3);
	String M_Twelve = Utils.dateToStr(MonthTwelve).substring(3);
	
	String Quality = request.getParameter("quality");
	if (request.getParameter("quality") == null) Quality = "2";
	System.out.println("NDR Quality:- " + Quality);
%>

<%@include file="../header.jsp"%><style type="text/css">
<!--
.style1 {
	font-family: Arial;
	font-size: 12px;
}
.style3 {font-weight: bold}
.style4 {font-family: Arial; font-size: 12px; font-weight: bold; }
.style5 {
	font-family: Arial;
	font-size: 10px;
}
-->
</style>

<script language="javascript">
function doCboClick()
{
	var form = document.formMain;
	form.submit();
}

function selectRowCol(row)
{
	var id = row.id;
	var form = document.formMain;
	var len = (id).length;

	var loop=0;
	var Val ="";
	var Chk ="";
	var clen = 0;
	var grdid="";
	var chkdt ="";
	while (loop <= len)
	{
		clen = loop;
		Val = id.substring(clen);
		Chk = Val.substring(0,1);
		
		if (Chk=="+")
		{
			chkdt = id.substring(clen+1);
			form.grade.value = grdid;
			form.ls_date.value=chkdt;
			return
		}
		else
		{
			if (loop ==0) grdid = Chk
			if (loop > 0) grdid = grdid+Chk;
		}
		loop=loop+1;
	}
}

function opencontract(row,type)
{
	var form = document.formMain;
	form.cnt_type.value = type;	
	form.action = "trade.physical.jsp";
	form.submit();	
}

function doReport()
{
	var form = document.formMain;
	doTask(5);
}
</script>
<form action="" method="post" name="formMain" id="formMain">
  <table width="100%"  border="0.5" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="4"><img src="images/net-diff-risk-report.jpg" width="300" height="30"></td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="5%">&nbsp;</td>
      <td width="2%">&nbsp;</td>
    </tr>
    <tr>
      <td width="1%">&nbsp;</td>
      <td width="4%">&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><span class="style1"><strong>&nbsp;Quality:</strong></span></td>
      <td colspan="2"><select name="quality" id="quality" style="font-family:Arial; font-size:12; width:60%;" tabindex="5" onChange="doCboClick();">
            <%
				task.getResponse().setOption(task.getMasterList("quality_master",true));
				task.getResponse().setSelected("quality",Quality);
			%>
        </select>
	  </td>
      <td><span class="style1"><span class="style3">
      </span></span></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td width="23%" align="center" valign="middle">&nbsp;</td>
      <td width="5%" align="center" valign="middle">&nbsp;</td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle"><strong></strong></td>
      <td align="center" valign="middle" class="style1 style3">&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="18"><table width="100%"  border="1" cellspacing="0" cellpadding="0">
        <tr bordercolor="#EEEEEE" bgcolor="#DDDDDD">
          <td colspan="2" rowspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1 style3">Particulars</td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong class="style1">Stock</strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_One%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Two%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Three%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Four%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Five%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Six%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Seven%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Eight%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Nine%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Ten%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Eleven%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><strong><%=M_Twelve%></strong></td>
          <td colspan="2" align="center" valign="middle" bgcolor="#DDDDDD" class="style1"><span class="style1 style3">Total</span></td>
          <td width="1%">&nbsp;</td>
        </tr>
        <tr bordercolor="#EEEEEE" bgcolor="#DDDDDD">
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Ton</td>
          <td width="3%" align="center" valign="middle" bgcolor="#DDDDDD" class="style1">Diff</td>
          <td width="1%">&nbsp;</td>
        </tr>
		  <%
		  	ResultSet Rs = task.getGradeList("name desc");
			float sum_stk_ton = 0;
			float chk_pton =0;
			float chk_ston =0;
			float stk_ton =0;
			float stk_diff =0;
			int qid =0;
			int mth  = 1;
			
			float Tot1 = 0;
			float Tot2 = 0;
			float Tot3 = 0;
			float Tot4 = 0;	
			float Tot5 = 0;
			float Tot6 = 0;
			float Tot7 = 0;
			float Tot8 = 0;
			float Tot9 = 0;
			float Tot10 = 0;
			float Tot11 = 0;
			float Tot12 = 0;			
			
		

			if (request.getParameter("quality") != null) qid = Utils.strToInt(request.getParameter("quality"));
			if (qid==0) qid=2;
			Rs.beforeFirst();
			int dloop=1;
			while (Rs.next())
			{
				chk_pton = task.getChkTon("contracts","pending_tons",qid,Rs.getInt("id"),"P");
				chk_ston = task.getChkTon("contracts","tons-inv_tons",qid,Rs.getInt("id"),"S")*-1;
				stk_ton = task.getStock(qid,Rs.getInt("id"));
				stk_diff = task.getStockAvgDiff(qid,Rs.getInt("id"));
				
				if ((chk_pton > 0) || (chk_ston != 0) || (stk_ton > 0))
				{
				
					float MP_Bef = 0;
					float MP_Aft = 0;
					float MS_Bef = 0;
					float MS_Aft = 0;
			
					float MPD_Bef = 0;
					float MPD_Aft = 0;
					float MSD_Bef = 0;
					float MSD_Aft = 0;					
				
					float MP1 = 0;
					float MPD1 = 0;
					
					float MP2 = 0;
					float MPD2 = 0;
					
					float MP3 = 0;
					float MPD3 = 0;
					
					float MP4 = 0;
					float MPD4 = 0;
						
					float MP5 = 0;
					float MPD5 = 0;
					
					float MP6 = 0;
					float MPD6 = 0;
					
					float MP7 = 0;
					float MPD7 = 0;
					
					float MP8 = 0;
					float MPD8 = 0;
					
					float MP9 = 0;
					float MPD9 = 0;
					
					float MP10 = 0;
					float MPD10 = 0;
					
					float MP11 = 0;
					float MPD11 = 0;
					
					float MP12 = 0;	
					float MPD12 = 0;
					
					float MS1 = 0;
					float MSD1 = 0;
					
					float MS2 = 0;
					float MSD2 = 0;
					
					float MS3 = 0;
					float MSD3 = 0;
					
					float MS4 = 0;
					float MSD4 = 0;
						
					float MS5 = 0;
					float MSD5 = 0;
					
					float MS6 = 0;
					float MSD6 = 0;
					
					float MS7 = 0;
					float MSD7 = 0;
					
					float MS8 = 0;
					float MSD8 = 0;
					
					float MS9 = 0;
					float MSD9 = 0;
					
					float MS10 = 0;
					float MSD10 = 0;
					
					float MS11 = 0;
					float MSD11 = 0;
					
					float MS12 = 0;				
					float MSD12 = 0;
					
					MP_Bef = task.getSumNDRReport_Before("contracts","pending_tons", qid, Rs.getInt("id"), MonthOne,"P");
					MPD_Bef = task.getAvgDiffNDRReport_Before("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthOne,"P");
					
					MP1 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthOne, MonthTwo,"P");
					MPD1 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthOne, MonthTwo,"P");
					
					MP2 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthTwo, MonthThree,"P");
					MPD2 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthTwo, MonthThree,"P");
					
					MP3 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthThree, MonthFour,"P");
					MPD3 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthThree, MonthFour,"P");
					
					MP4 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthFour, MonthFive,"P");	
					MPD4 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthFour, MonthFive,"P");	
					
					MP5 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthFive, MonthSix,"P");
					MPD5 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthFive, MonthSix,"P");
					
					MP6 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthSix, MonthSeven,"P");
					MPD6 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthSix, MonthSeven,"P");
					
					MP7 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthSeven, MonthEight,"P");
					MPD7 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthSeven, MonthEight,"P");
					
					MP8 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthEight, MonthNine,"P");
					MPD8 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthEight, MonthNine,"P");
					
					MP9 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthNine, MonthTen,"P");
					MPD9 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthNine, MonthTen,"P");
					
					MP10 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthTen, MonthEleven,"P");
					MPD10 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthTen, MonthEleven,"P");
					
					MP11 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"P");
					MPD11 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"P");
					
					MP12 = task.getSumNDRReport("contracts", "pending_tons", qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"P");	
					MPD12 = task.getAvgDiffNDRReport("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"P");	
					
					MP_Aft = task.getSumNDRReport_After("contracts", "pending_tons", qid, Rs.getInt("id"), MonthThirteen,"P");

					MS_Bef = task.getSumNDRReport_Before("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthOne,"S");			
					MSD_Bef = task.getAvgDiffNDRReport_Before("contracts", "pending_tons","pending_tons*differential_fob", qid, Rs.getInt("id"), MonthOne,"S");		
																							
					MS1 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthOne, MonthTwo,"S");
					MSD1 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthOne, MonthTwo,"S");					
					
					MS2 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthTwo, MonthThree,"S");
					MSD2 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthTwo, MonthThree,"S");
															
					MS3 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthThree, MonthFour,"S");
					MSD3 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthThree, MonthFour,"S");
					
					MS4 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthFour, MonthFive,"S");
					MSD4 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthFour, MonthFive,"S");	
					
					MS5 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthFive, MonthSix,"S");
					MSD5 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthFive, MonthSix,"S");
					
					MS6 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthSix, MonthSeven,"S");
					MSD6 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthSix, MonthSeven,"S");
					
					MS7 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthSeven, MonthEight,"S");
					MSD7 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthSeven, MonthEight,"S");
					
					MS8 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthEight, MonthNine,"S");
					MSD8 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthEight, MonthNine,"S");
					
					MS9 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthNine, MonthTen,"S");
					MSD9 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthNine, MonthTen,"S");
					
					MS10 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthTen, MonthEleven,"S");
					MSD10 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons","(tons-inv_tons)*differential_fob", qid, Rs.getInt("id"), MonthTen, MonthEleven,"S");
					
					MS11 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"S");
					MSD11 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons", "(tons-inv_tons)*differential_fob",qid, Rs.getInt("id"), MonthEleven, MonthTwelve,"S");
					
					MS12 = task.getSumNDRReport("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"S");
					MSD12 = task.getAvgDiffNDRReport("contracts", "tons-inv_tons", "(tons-inv_tons)*differential_fob",qid, Rs.getInt("id"), MonthTwelve, MonthThirteen,"S");
					
					MS_Aft = task.getSumNDRReport_After("contracts", "tons-inv_tons", qid, Rs.getInt("id"), MonthThirteen,"S");
										
					Tot1 = Tot1+(MP_Bef+MS_Bef)+(MP1 + MS1);		
					Tot2 = Tot2+(MP2 + MS2);
					Tot3 = Tot3+(MP3 + MS3);
					Tot4 = Tot4+(MP4 + MS4);
					Tot5 = Tot5+(MP5 + MS5);
					Tot6 = Tot6+(MP6 + MS6);
					Tot7 = Tot7+(MP7 + MS7);
					Tot8 = Tot8+(MP8 + MS8);
					Tot9 = Tot9+(MP9 + MS9);
					Tot10 = Tot10+(MP10 + MS10);
					Tot11 = Tot11+(MP11 + MS11);
					Tot12 =(Tot12+MP_Aft+MS_Aft)+(MP12 + MS12);			
					sum_stk_ton=sum_stk_ton+stk_ton;				
					String ColId = Rs.getInt("id") + "+" + Utils.dateToStr(MonthTwo);
					String ColId2 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthThree);
					String ColId3 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthFour);
					String ColId4 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthFive);
					String ColId5 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthSix);
					String ColId6 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthSeven);
					String ColId7 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthEight);
					String ColId8 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthNine);
					String ColId9 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthTen);
					String ColId10 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthEleven);
					String ColId11 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthTwelve);
					String ColId12 = Rs.getInt("id") + "+" + Utils.dateToStr(MonthThirteen);
		  %>
		
          <tr bordercolor="#EEEEEE">
            <td colspan="10" class="style4"><%=Rs.getString("name")%></td>
            <td id= "<%=ColId4%>" align="right" class="style1" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId5%>" align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId6%>" align="right" class="style1" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId7%>" align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId8%>" align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId9%>" align="right" class="style1" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId10%>" align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId11%>" align="right" class="style1" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td id= "<%=ColId12%>" align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5" onClick="selectRowCol(this);">&nbsp;</td>
            <td align="right" class="style5">&nbsp;</td>
            <td align="center" valign="middle" class="style1">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr bordercolor="#EEEEEE">
           			<td width="2%" class="style1">&nbsp;</td>
            		<td width="13%" align="left" class="style1"><em>Purchase</em></td>
            		<td width="3%" align="right"><span class="style5"><%=task.FormatZero(stk_ton,0,"")%></span></td>
            		<td width="3%" align="right" class="style5"><%=task.FormatZero(stk_diff,0,"-")%></td>
            		<td id= "<%=ColId%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP1+MP_Bef,0,".")%></a></td>
                    <%
						float befAvg_P = (((MP1*MPD1)+(MPD_Bef*MP_Bef))/(MP1+MP_Bef));
					%>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(befAvg_P,0,"-")%></td>
            		<td id= "<%=ColId2%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP2,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD2,0,"-")%></td>
            		<td id= "<%=ColId3%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP3,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD3,0,"-")%></td>
            		<td id= "<%=ColId4%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');" class="style5"><%=task.FormatZero(MP4,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD4,0,"-")%></td>
            		<td id= "<%=ColId5%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP5,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD5,0,"-")%></td>
            		<td id= "<%=ColId6%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');" class="style5"><%=task.FormatZero(MP6,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD6,0,"-")%></td>
            		<td id= "<%=ColId7%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP7,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD7,0,"-")%></td>
            		<td id= "<%=ColId8%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP8,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD8,0,"-")%></td>
            		<td id= "<%=ColId9%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');" class="style5"><%=task.FormatZero(MP9,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD9,0,"-")%></td>
            		<td id= "<%=ColId10%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP10,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD10,0,"-")%></td>
            		<td id= "<%=ColId11%>" width="3%" align="right" class="style1" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');" class="style5"><%=task.FormatZero(MP11,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD11,0,"-")%></td>
            		<td id= "<%=ColId12%>" width="3%" align="right" class="style5" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'P');"><%=task.FormatZero(MP12+MP_Aft,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MPD12,0,"-")%></td>
            		<td width="3%" align="right" class="style5"><%=task.FormatZero(chk_pton+stk_ton,0,"-")%></td>
          			<td width="3%" align="center" valign="middle" class="style1">&nbsp;</td>
          			<td width="1%">&nbsp;</td>
		</tr>
        <tr bordercolor="#EEEEEE">
           			<td width="2%" class="style1">&nbsp;</td>
            		<td width="13%" align="left" class="style1"><em>Sales</em></td>
            		<td width="3%" align="right">&nbsp;</td>
            		<td width="3%" align="right">&nbsp;</td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS1+MS_Bef,0,".")%></a></td>
                    <%
						float befAvg_S = (((MS1*MSD1)+(MSD_Bef*MS_Bef))/(MS1+MS_Bef));
					%>                    
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(befAvg_S,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId2%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS2,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD2,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId3%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS3,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD3,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId4%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS4,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD4,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId5%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS5,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD5,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId6%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS6,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD6,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId7%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS7,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD7,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId8%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS8,0,".")%></a></td>
            		<td width="3%" align="right" class="style5"  onClick="selectRowCol(this);"><%=task.FormatZero(MSD8,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId9%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS9,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD9,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId10%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS10,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD10,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId11%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS11,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD11,0,"-")%></td>
            		<td width="3%" align="right" class="style5" id= "<%=ColId12%>" onClick="selectRowCol(this);"><a href="javascript:opencontract(this,'S');"><%=task.FormatZero(MS12+MS_Aft,0,".")%></a></td>
            		<td width="3%" align="right" class="style5" onClick="selectRowCol(this);"><%=task.FormatZero(MSD12,0,"-")%></td>
            		<td width="3%" align="right" class="style5"><%=task.FormatZero(chk_ston,0,".")%></td>
          			<td width="3%" align="center" valign="middle" class="style1">&nbsp;</td>
          			<td width="1%">&nbsp;</td>
		</tr>
        <tr bordercolor="#EEEEEE">
           		  <td colspan="2" class="style1"><span class="style1 style3">Total</span></td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(stk_ton,0)%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
       		      <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(((MP1+MP_Bef)+(MS1+MS_Bef)),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP2+MS2),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP3+MS3),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP4+MS4),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP5+MS5),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP6+MS6),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP7+MS7),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP8+MS8),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP9+MS9),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP10+MS10),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((MP11+MS11),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(((MP12+MP_Aft)+(MS12+MS_Aft)),0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero((stk_ton)+((MP1+MP_Bef)+(MS1+MS_Bef))+(MP2+MS2)+(MP3+MS3)+(MP4+MS4)+(MP5+MS5)+(MP6+MS6)+(MP7+MS7)+(MP8+MS8)+(MP9+MS9)+(MP10+MS10)+(MP11+MS11)+((MP12+MP_Aft)+(MS12+MS_Aft)),0,".")%></td>
          		  <td width="3%" align="center" valign="middle" class="style1">&nbsp;</td>
          		  <td width="1%">&nbsp;</td>		
		</tr>
		<%
					dloop=dloop+1;
				}
						
			}
		%>		
        <tr bordercolor="#EEEEEE">
           		  <td colspan="2" class="style1"><span class="style4">Grand Total</span></td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(sum_stk_ton,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
       		      <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot1,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot2,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot3,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot4,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot5,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot6,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot7,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot8,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot9,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot10,0,".")%></td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
            	  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot11,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
       		      <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(Tot12,0,".")%></td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4">&nbsp;</td>
           		  <td width="3%" align="right" bordercolor="#BBBBBB" class="style4"><%=task.FormatZero(sum_stk_ton+Tot1+Tot2+Tot3+Tot4+Tot5+Tot6+Tot7+Tot8+Tot9+Tot10+Tot11+Tot12,0,".")%></td>
          		  <td width="3%" align="center" valign="middle" class="style1">&nbsp;</td>
          		  <td width="1%">&nbsp;</td>	
        </tr>
      </table></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><img src="images/report.jpg" width="55" height="18" onClick="doReport();"></td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td colspan="2">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><input type="hidden" name="task_id"    id = "task_id"   value="0"></td>
      <td><input type="hidden" name="ls_date"        id="ls_date"       value="<%=new java.sql.Date(0)%>"></td>
      <td><input type="hidden" name="grade"        id="grade"       value="0"></td>
      <td><input type="hidden" name="uid"        id="uid"       value="<%=user.getuid()%>"></td>
      <td><input type="hidden" name="cnt_type"        id="cnt_type"       value="0"></td>
    </tr>
  </table>

</form>


<%@include file="../footer.jsp"%>